package com.cui.project.model.enums;


import lombok.Getter;

/**
 * 预测时间粒度
 */
@Getter
public enum ForecastTimeGranularityEnum {
    MINUTE("minute","分钟"),
    HOUR("hour" ,"小时"),
    DAY("day","天" );

    private final String name;
    private final String description;

    ForecastTimeGranularityEnum(String name, String description) {
        this.name = name;
        this.description = description;

    }


    public static ForecastTimeGranularityEnum get(String name){
        for (ForecastTimeGranularityEnum value : values()) {
            if(value.name.equals(name)){
                return value;
            }
        }
        return null;
    }



}
